import request from '@/utils/request';

// 上传
export const sendMessage = (data: any) => {
  return request({
    url: '/business/meeting/getSimple',
    method: 'post',
    data: data
  });
};

/* ai任务 */
// 查询ai任务列表
export const listAiTask = (query?: any) => {
  return request({
    url: '/business/aiTask/list',
    method: 'get',
    params: query
  });
};

/**
 * 通过taskId获取ai任务详细信息
 * @param taskId
 */
export const getAiTask = (taskId: any) => {
  return request({
    url: '/business/aiTask/' + taskId,
    method: 'get'
  });
};

// 新增ai任务
export const addAiTask = (data: any) => {
  return request({
    url: '/business/aiTask',
    method: 'post',
    data: data
  });
};

// 修改ai任务
export const updateAiTask = (data: any) => {
  return request({
    url: '/business/aiTask',
    method: 'put',
    data: data
  });
};

// 删除ai任务
export const delAiTask = (taskIds: number | string) => {
  return request({
    url: '/business/aiTask/' + taskIds,
    method: 'delete'
  });
};

/* 获取思维导图 */
export const getMindMap = (taskId: any) => {
  return request({
    url: '/business/meeting/generateMindMap?id=' + taskId,
    method: 'get'
  });
};
